package com.qiaodata.datatrans.entity;

import org.bson.types.ObjectId;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;
import org.springframework.data.mongodb.core.mapping.Field;

import java.io.Serializable;
import java.util.Collection;
import java.util.LinkedHashSet;

/**
 * Created by yangkuan on 2016/11/12.
 */
@Document//映射领域模型和Mongodb的文档
public class Resumer implements Serializable {
    private static final long serialVersionUID = 862690805L;
    @Id//文档的id
    private ObjectId id;
    private Long resume_id;
    private String server_ip;//用以接收错误信息
    private Long person_id;
    private Long create_time;
    private Long version_date;
    private Long last_date;
    @Field("meta_info")
    private MetaInfo metaInfo;
    @Field("resume_info")
    private ResumeInfo resumeInfo;
    @Field("deliver_info")//此属性在文档中的名称为deliver_info，deliverInfos属性将以数组形式存在当前数据记录中
    private Collection<DeliverInfo> deliverInfos = new LinkedHashSet<DeliverInfo>();

    public Resumer(){}
    public ObjectId getId() {
        return id;
    }

    public void setId(ObjectId id) {
        this.id = id;
    }

    public Long getResume_id() {
        return resume_id;
    }

    public void setResume_id(Long resume_id) {
        this.resume_id = resume_id;
    }

    public String getServer_ip() {
        return server_ip;
    }

    public void setServer_ip(String server_ip) {
        this.server_ip = server_ip;
    }

    public Long getPerson_id() {
        return person_id;
    }

    public void setPerson_id(Long person_id) {
        this.person_id = person_id;
    }

    public Long getCreate_time() {
        return create_time;
    }

    public void setCreate_time(Long create_time) {
        this.create_time = create_time;
    }

    public Long getVersion_date() {
        return version_date;
    }

    public void setVersion_date(Long version_date) {
        this.version_date = version_date;
    }

    public Long getLast_date() {
        return last_date;
    }

    public void setLast_date(Long last_date) {
        this.last_date = last_date;
    }

    public MetaInfo getMetaInfo() {
        return metaInfo;
    }

    public void setMetaInfo(MetaInfo metaInfo) {
        this.metaInfo = metaInfo;
    }

    public ResumeInfo getResumeInfo() {
        return resumeInfo;
    }

    public void setResumeInfo(ResumeInfo resumeInfo) {
        this.resumeInfo = resumeInfo;
    }

    public Collection<DeliverInfo> getDeliverInfos() {
        return deliverInfos;
    }

    public void setDeliverInfos(Collection<DeliverInfo> deliverInfos) {
        this.deliverInfos = deliverInfos;
    }
}
